package com.lm.jetty.config;


import org.springframework.boot.web.embedded.jetty.JettyServerCustomizer;
import org.springframework.boot.web.embedded.jetty.JettyServletWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class JettyConfig {

    @Bean
    public JettyServletWebServerFactory jettyServletWebServerFactory() {
        JettyServletWebServerFactory factory = new JettyServletWebServerFactory();

        factory.addServerCustomizers((JettyServerCustomizer) server -> {
            // 可以自定义线程池或其他 Server 配置
            System.out.println("Jetty server customizing...");
        });

        return factory;
    }
}